import { request } from '@umijs/max';
import { IRes } from '.';

/**
 * 单个文件上传
 */
export const singleUpload = (data: { file: any }) => {
  const form = new FormData();
  form.append('file', data.file);
  return request<IRes<string>>('/v1/business/file/uploadFile', {
    method: 'POST',
    data: form,
  });
};
